import http from 'pocky-request';
import utils from '../common/utils.js';
import config from './pageConfig.js';

export default {
	// 请求token
	getMockToken(code, iv, encryptedData) {
		const that = this;
		var data = {
			code: code,
			iv: iv,
			encryptedData: encryptedData,
			options: config.obj.options,
			ticks: utils.utils.GetTicks(),
			channel: config.obj.channel
		};
		data.sign = utils.utils.GetSign(data);

		return http().request({
				url: `/Login/Oauth`,
				method: 'post',
				data: data,
				count: 0
			})
	}

}
